package com.codyy.lib_common.api

import android.os.Build
import androidx.annotation.RequiresApi

class ApiError : Error {
    var status: String
    var detail:Any?=null

    constructor(status: String):super() {
        this.status = status
    }

    constructor(status: String, message: String?) : super(message) {
        this.status = status
    }

    constructor(status: String, message: String?, cause: Throwable?) : super(
        message,
        cause
    ) {
        this.status = status
    }

    constructor(status: String, cause: Throwable?) : super(cause) {
        this.status = status
    }

    @RequiresApi(api = Build.VERSION_CODES.N)
    constructor(
        status: String,
        message: String?,
        cause: Throwable?,
        enableSuppression: Boolean,
        writableStackTrace: Boolean
    ) : super(message, cause, enableSuppression, writableStackTrace) {
        this.status = status
    }

}